home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / editor / auror300.zip / CFGMARG.AML < prev    next >
Text File  |  1996-07-17  |  2KB  |  60 lines

  1. //--------------------------------------------------------------------
  2. // The Aurora Editor v3.0, Copyright (C) 1993-1996 nuText Systems
  3. //
  4. // CFGMARG.AML
  5. // Configuration for Margins and Tabs
  6. //--------------------------------------------------------------------
  7.  
  8. include bootpath "define.aml"
  9.  
  10. variable lmargin, rmargin, tabwidth, vartabs, tabopt1, tabopt2
  11.  
  12. // create dialog box
  13. dialog "Margins and Tabs" 38 17 "cp"
  14.  
  15. // margins
  16. field "&Margins: >"  3  2  5 _LMargin
  17. field ""            20  1  5 _RMargin
  18.  
  19. // tabs
  20. field "&Fixed Tab Width: >"   3  4  5 _TabWidth
  21. field "&Variable Tab Stops:"  3  6 33 _VarTabs
  22.  
  23. // tab display options
  24. groupbox 'Display Tab Characters as:' 3 9
  25.   (menu ''
  26.      item " ( ) &Ascii 9 (\t)"
  27.      item " ( ) Spaces, if found on &Open    "
  28.      item " ( ) &Spaces"
  29.    end) '' _TabOpt "aos"
  30.  
  31. // tab left/right options
  32. groupbox 'Tab Left/Right Options:' 3 14
  33.   (menu ''
  34.      item " [ ] S&hift Text in Insert Mode   "
  35.      item " [ ] Use &Real Tabs"
  36.    end) '' _TabOpt "hr"
  37.  
  38. // ok/cancel buttons
  39. button "O&k"    28 2 8
  40. button "Cancel" 28 4 8
  41.  
  42. // display dialogbox
  43. if (getdialog ref lmargin  ref rmargin ref tabwidth
  44.               ref vartabs  ref tabopt1 ref tabopt2) == 'Ok' then
  45.   prf.LMargin  = lmargin
  46.   prf.RMargin  = rmargin
  47.   prf.TabWidth = tabwidth
  48.   prf.VarTabs  = vartabs
  49.   prf.TabOpt   = tabopt1 + tabopt2
  50.  
  51.   // modify real tabs for the current edit window
  52.   if wintype? "edit" then
  53.     if pos 'a' tabopt1 then
  54.       setbuftabs
  55.     elseif (pos 's' tabopt1) or getbuftabs then
  56.       setbuftabs tabwidth
  57.     end
  58.   end
  59. end
  60.